package practice;

//import src.private1.TimeAccount;

public class TimeAccountTester2 {
    //谁可用余额更多呢
    static int compBalance(Account2 a,Account2 b){//将main方法里的Account2类型实例的引用，TimeAccount类型实例的引用传递给这两个形参Account2
        if (a.getBalance()>b.getBalance())   //  TimeAccount类型的实例引用可以传递                              main方法里的Account2类型实例的引用，不可以传递到TimeAccount
            return 1;
        if (a.getBalance()<b.getBalance())
            return -1;
        return 0;

    }

    public static void main(String[] args) {
        Account2 adachi=new Account2("张旺","4324324",5000);
       // TimeAccount nakata=new TimeAccount("张淳柏","432432423",888888888,999999);
//        switch (compBalance(adachi,nakata)){
//            case 0:
//                System.out.println("张旺和张淳柏可用余额相同");
//            case 1:
//                System.out.println("张旺的可用余额比张淳柏多");
//            case -1:
//                System.out.println("张淳柏的可用余额比张旺多");
//
//        }


    }
}
